<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta name="GENERATOR" content="PasDoc 0.11.0">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Crispy Plotter Documentation: AppUtils</title>
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#FF0000">
<h1 class="unit">Unit AppUtils</h1>
<table class="sections wide_list">
<tr>
<td><a class="section"  href="#%40Description">Description</a></td><td>uses</td><td><a class="section"  href="#%40Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section"  href="#%40FuncsProcs">Functions and Procedures</a></td><td><a class="section"  href="#%40Types">Types</a></td><td><a class="section"  href="#%40Constants">Constants</a></td><td>Variables</td></tr></table>
<a name="%40Description"></a><h2 class="description">Description</h2>
<p>
Provides global application routines, mainly for restricting Crispy Plotter to one running instance only.</p>
<a name="%40Uses"></a><h2 class="overview">Overview</h2>
<a name="%40Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
<table class="classestable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname">record&nbsp;<a class="bold"  href="AppUtils.TOpenFileRecord.html"><code>TOpenFileRecord</code></a></td>
<td class="itemdesc">Record that is used to send the open-file request to the first running instance</td>
</tr>
</table>
<a name="%40FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code>procedure <b><a   href="AppUtils.html#WriteHandleToReg">WriteHandleToReg</a></b>(Handle: HWND);</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="AppUtils.html#IsFirstInstance">IsFirstInstance</a></b>: Boolean;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a   href="AppUtils.html#GetFileParam">GetFileParam</a></b>(CmdLine: string): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="AppUtils.html#CustomDlg">CustomDlg</a></b>(const Msg: string; DlgType: TMsgDlgType; Buttons: Integer): Integer;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a   href="AppUtils.html#GetManualPath">GetManualPath</a></b>: string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="AppUtils.html#FlattenText">FlattenText</a></b>(Text: String): String;</code></td>
</tr>
</table>
<a name="%40Types"></a><h3 class="summary">Types</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a   href="AppUtils.html#POpenFileRecord">POpenFileRecord</a></b> = &circ;<a   href="AppUtils.TOpenFileRecord.html">TOpenFileRecord</a>;</code></td>
</tr>
</table>
<a name="%40Constants"></a><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a   href="AppUtils.html#CDSOpenFile">CDSOpenFile</a></b> = $100;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a   href="AppUtils.html#LengthFileName">LengthFileName</a></b> = 4096;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a   href="AppUtils.html#RenderModes">RenderModes</a></b>: array[0..3] of <a   href="CPPlotCanvas.html#TCPPlotCanvasClass">TCPPlotCanvasClass</a> =
    (<a   href="CPGDIPlotCanvas.TCPGDIPlotCanvas.html">TCPGDIPlotCanvas</a>, <a   href="CPGDIPlusPlotCanvas.TCPGDIPlusPlotCanvas.html">TCPGDIPlusPlotCanvas</a>, <a   href="CPOpenGLPlotCanvas.TCPOpenGLPlotCanvas.html">TCPOpenGLPlotCanvas</a>,
      <a   href="CPAggPlotCanvas.TCPAggPlotCanvas.html">TCPAggPlotCanvas</a>);</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Functions and Procedures</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="WriteHandleToReg"></a><code>procedure <b>WriteHandleToReg</b>(Handle: HWND);</code></td>
</tr>
<tr><td colspan="1">
<p>
Writes a handle to the registry so another CP instance can contact this instance.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="IsFirstInstance"></a><code>function <b>IsFirstInstance</b>: Boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns true, if this instance is the first (and at its application start the only) instance of CP</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="GetFileParam"></a><code>function <b>GetFileParam</b>(CmdLine: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns a file path of a function file requested to be openend (passed as command line argument).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CustomDlg"></a><code>function <b>CustomDlg</b>(const Msg: string; DlgType: TMsgDlgType; Buttons: Integer): Integer;</code></td>
</tr>
<tr><td colspan="1">
<p>
Displays a message dialog with a set of predefined buttons.    </p>
<h6 class="description_section">Parameters</h6>
<dl class="parameters">
<dt>Msg</dt>
<dd>Message string to be displayed</dd>
<dt>DlgType</dt>
<dd>Type of dialog</dd>
<dt>Buttons</dt>
<dd>Buttons can have one of the following values: </p>

<dl class="paragraph_spacing">
  <dt>MB_ABORTRETRYIGNORE</dt>
  <dd><p>The message box contains three push buttons: Abort, Retry, and Ignore.</p></dd>
  <dt>MB_OK</dt>
  <dd><p>The message box contains one push button: OK. This is the default.</p></dd>
  <dt>MB_OKCANCEL</dt>
  <dd><p>The message box contains two push buttons: OK and Cancel.</p></dd>
  <dt>MB_RETRYCANCEL</dt>
  <dd><p>The message box contains two push buttons: Retry and Cancel.</p></dd>
  <dt>MB_YESNO</dt>
  <dd><p>The message box contains two push buttons: Yes and No.</p></dd>
  <dt>MB_YESNOCANCEL</dt>
  <dd><p>The message box contains three push buttons: Yes, No, and Cancel.</p></dd>
</dl>

<p></dd>
</dl>
<h6 class="description_section">Returns</h6>
<p class="return">Returns one of the following values representing the clicked button: </p>

<dl class="paragraph_spacing">
  <dt>IDABORT</dt>
  <dd><p>Abort button was selected.</p></dd>
  <dt>IDCANCEL</dt>
  <dd><p>Cancel button was selected.</p></dd>
  <dt>IDIGNORE</dt>
  <dd><p>Ignore button was selected.</p></dd>
  <dt>IDNO</dt>
  <dd><p>No button was selected.</p></dd>
  <dt>IDOK</dt>
  <dd><p>OK button was selected.</p></dd>
  <dt>IDRETRY</dt>
  <dd><p>Retry button was selected.</p></dd>
  <dt>IDYES</dt>
  <dd><p>Yes button was selected.</p></dd>
</dl>

<p> </p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="GetManualPath"></a><code>function <b>GetManualPath</b>: string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns the path to the manual in the current language of Crispy Plotter. If the selected language does not feature a localized version of the manual then the path to the English manual is returned.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FlattenText"></a><code>function <b>FlattenText</b>(Text: String): String;</code></td>
</tr>
<tr><td colspan="1">
<p>
Remove white space and control characters (e.g. tabs or line breaks).</p>
</td></tr>
</table>
<h3 class="detail">Types</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="POpenFileRecord"></a><code><b>POpenFileRecord</b> = &circ;<a   href="AppUtils.TOpenFileRecord.html">TOpenFileRecord</a>;</code></td>
</tr>
<tr><td colspan="1">
&nbsp;</td></tr>
</table>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CDSOpenFile"></a><code><b>CDSOpenFile</b> = $100;</code></td>
</tr>
<tr><td colspan="1">
<p>
Constant for receiving file requests</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="LengthFileName"></a><code><b>LengthFileName</b> = 4096;</code></td>
</tr>
<tr><td colspan="1">
<p>
Maximum length of file name for file requests</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="RenderModes"></a><code><b>RenderModes</b>: array[0..3] of <a   href="CPPlotCanvas.html#TCPPlotCanvasClass">TCPPlotCanvasClass</a> =
    (<a   href="CPGDIPlotCanvas.TCPGDIPlotCanvas.html">TCPGDIPlotCanvas</a>, <a   href="CPGDIPlusPlotCanvas.TCPGDIPlusPlotCanvas.html">TCPGDIPlusPlotCanvas</a>, <a   href="CPOpenGLPlotCanvas.TCPOpenGLPlotCanvas.html">TCPOpenGLPlotCanvas</a>,
      <a   href="CPAggPlotCanvas.TCPAggPlotCanvas.html">TCPAggPlotCanvas</a>);</code></td>
</tr>
<tr><td colspan="1">
&nbsp;</td></tr>
</table>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  target="_parent" href="http://pasdoc.sourceforge.net/">PasDoc 0.11.0</a> on 2009-07-25 15:33:03</em>
</span>
</body></html>
